package com.example.teesystem.entity.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 封装分页返回信息
 * @param <T>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResponseVo<T> {
    private List<T> records;
    private long current;
    private long size;
    private long pages;
    
    public PageResponseVo(Page<T> page) {
        BeanUtils.copyProperties(page, this);
    }
}
